package com.example.bootdemo5.controller;


import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

@RestController
public class HelloConroller {


    /**
     * HelloWord
     * @return
     */
    @GetMapping("/hello")
    public Object  hello(HttpServletRequest  request){
        HttpSession  session  =request.getSession();
        session.setAttribute("loginSucess","张三");
        return "你好 SpringBoot";
    }
}
